package cn.itcast.mq.bean.listener;

import cn.itcast.mq.bean.config.BeanRabbitBackupConfig;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class BeanRabbitBackupListener {

    @RabbitListener(queues = BeanRabbitBackupConfig.BACKUP_QUEUE)
    public void receiveBackupQueueMessage(String message) {
        System.out.println("备份发现不可路由消息：" + message);
    }

    @RabbitListener(queues = BeanRabbitBackupConfig.WARNING_QUEUE)
    public void receiveWaringQueueMessage(String message) {
        System.out.println("报警发现不可路由消息：" + message);
    }

}
